package com.zj.study.utils.validation.validator.object;


import com.zj.study.utils.validation.annotation.ValidateSupport;
import com.zj.study.utils.validation.annotation.constraint.NotNull;
import com.zj.study.utils.validation.validator.ConstraintValidator;
import org.springframework.lang.NonNull;

/**
 * @author 谭耀飞
 * @since 2020.11.0
 */
@ValidateSupport(Object.class)
public class NotNullValidator implements ConstraintValidator<NotNull, Object> {

  @Override
  public boolean isValid(@NonNull NotNull notNull, Object value) {
    return value != null;
  }
}
